﻿@using Swimj.RazorLib.Components.Drawer
<MudContainer>
    This is some content in the pane.  The message passed here is <strong>@Message</strong>
</MudContainer>

<MudDivider Class="my-5" />

<MudContainer>
    <MudStack Row="true" Justify="Justify.SpaceBetween">
        <MudButton OnClick="Close" Variant="Variant.Filled">Close</MudButton>
        <MudButton Color="Color.Primary" OnClick="Submit" Variant="Variant.Filled">Submit</MudButton>
    </MudStack>
</MudContainer>

@code {
    [CascadingParameter] 
    private MudDrawerInstance DrawerInstance { get; set; }
    
    [Parameter] 
    public string Message { get; set; }

    private void Submit()
    {
        DrawerInstance.Close();
    }

    private void Close()
    {
        DrawerInstance.Cancel();
    }
}